package com.wlb.test.service.quartz.example;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author:wanglibing
 * @Mail:1728891211@qq.com
 * @Date:Created in 9:08 2018/1/10
 * @Description:
 */
public class HelloJob implements Job {
    private final Logger log = LoggerFactory.getLogger(HelloJob.class);
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        log.info("This is a first spring combine quartz !");
        log.info("Welcome to Spring_Quartz World!"+ new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) );
        log.error("Let's begin ! \n \n");
    }
}
